package com.firemoss.atonement.example.contactmanager.service
{
	import com.firemoss.atonement.entitymanager.util.EntityIdResolver;
	import com.firemoss.atonement.example.contactmanager.model.Company;
	import com.firemoss.atonement.example.contactmanager.model.Contact;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.remoting.mxml.RemoteObject;
	
	public class ContactService
	{
		[Inject( bean="contactRemoteObject" )]
		public var remoteObject : RemoteObject
		
		public function listCompanies() : AsyncToken
		{
			return remoteObject.listCompanies()
		}
		
		public function saveCompany( company : Company ) : AsyncToken
		{
			return remoteObject.saveCompany( company )
		}
		
		public function listContacts() : AsyncToken
		{
			return remoteObject.listContacts()
		}
		
		public function saveContact( contact : Contact ) : AsyncToken
		{
			return remoteObject.saveContact( contact )
		}
		
		public function getContact( id : Number ) : AsyncToken
		{
			return remoteObject.getContact( id )
		}
		
		// compiler forcing
		private var foo : EntityIdResolver = new EntityIdResolver()
	}
}